package com.kupurui.asteacher.ui.mine;

import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.text.Html;
import android.widget.TextView;

import com.android.frame.util.AppJsonUtil;
import com.kupurui.asteacher.R;
import com.kupurui.asteacher.http.Banben;
import com.kupurui.asteacher.ui.BaseAty;

import butterknife.Bind;
import butterknife.ButterKnife;
import okhttp3.Call;
import okhttp3.Response;

/**
 * Created by Administrator on 2017/7/26.
 */

public class AgreementAty extends BaseAty {

    @Bind(R.id.tv_bar_title)
    TextView tvBarTitle;
    @Bind(R.id.m_toolbar)
    Toolbar mToolbar;
    @Bind(R.id.tv_content)
    TextView tvContent;

    @Override
    public int getLayoutId() {
        return R.layout.agreement_aty;
    }

    @Override
    public void initData() {
        initToolbar(mToolbar,"服务协议");
    }

    @Override
    public void requestData() {
        showLoadingContent();
        new Banben().service(this,0);
    }

    @Override
    public void onSuccess(String result, Call call, Response response, int what) {
        switch (what){
            case 0:
                tvContent.setText(AppJsonUtil.getString(result,"content"));
                break;
        }
        super.onSuccess(result, call, response, what);
    }
}
